﻿@model Stardust.Models.OrdenCompras
        
@*<h2>Listado de Orden de Compra</h2>*@

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


 @using (Html.BeginForm("ListarOC", "Proveedor", FormMethod.Post, new { @class = "form" }))
{
    <div class="title"><h2>Órdenes de Compra del Proveedor</h2> </div>
     <p></p><p></p>
     
     <fieldset>
     <div class = "formRow">
         <label>Id Proveedor</label>
         <div class = "formRight" > @Html.DisplayFor(model => model.id)</div>
         <div class = "clear" ></div>
     </div>
    
     <div class = "formRow">
         <label>Nombre Proveedor</label>
         <div class = "formRight" >@Html.DisplayFor(model => model.nombre)</div>
         <div class = "clear" ></div>
     </div>


     </fieldset>
    
        <table cellpadding = "0" cellspacing = "0" width = "100%" class = "sTable" >

    <thead>
        <tr>
           <td>Estado</td>
           <td>Fecha de Emisión</td>
           <td>Monto</td>

           
        </tr>
    </thead>

    <tbody>

  
    @for (int i = 0; (i < Model.listaOC.Count); i++)
    {
             <tr>       
                @Html.HiddenFor(model => model.id)
                <td> @Html.DisplayFor(model => model.listaOC[i].estado) @Html.HiddenFor(model => model.listaOC[i].estado) </td>
                <td> @Html.DisplayFor(model => model.listaOC[i].fecha)   @Html.HiddenFor(model => model.listaOC[i].fecha)</td>
                <td> @Html.DisplayFor(model => model.listaOC[i].precio)  @Html.HiddenFor(model => model.listaOC[i].precio) </td>

            </tr>    
    }
           
    </tbody>

    </table>
    <p></p><p></p><p></p>
    <p>
        @Html.ActionLink("Generar Reporte", "Nada", new { id = Model.id}, new { target = "_blank" }) |
        @Html.ActionLink("Regresar", "Proveedor", "Reporte")
    </p>
    }

